﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Reflection;

namespace Tsanie.DmPoster {
    public partial class AboutForm : Form {
        public AboutForm() {
            InitializeComponent();
        }

        private void AboutForm_Load(object sender, EventArgs e) {
            this.Text = "关于 - " + Config.c_AppCaption;
        }

        private void buttonClose_Click(object sender, EventArgs e) {
            this.Close();
        }

        private void linkBlog_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) {
            System.Diagnostics.Process.Start(linkBlog.Text);
        }

        private void AboutForm_Shown(object sender, EventArgs e) {
            using (Stream stream = Assembly.GetExecutingAssembly()
                .GetManifestResourceStream("Tsanie.DmPoster.changelog.txt")) {
                StreamReader reader = new StreamReader(stream, Encoding.GetEncoding("gbk"));
                textMemo.Text = reader.ReadToEnd();
                reader.Close();
                reader.Dispose();
            }
        }
    }
}
